package com.qdlc.p2p.biz.service.user.identify;

import com.qdlc.p2p.dal.checkrule.RealNameAttestationRuleCheck;
import com.qdlc.p2p.dal.common.RuleCheckHelper;
import com.qdlc.p2p.dal.model.UserModel;

/**
 * 实名认证方式
 * 
 * @author sj
 * @version 2.0
 * @since 2014年3月21日
 */
public class UserIdentifyFactory {

	private long userId;
	private UserModel model;
	private RealNameAttestationRuleCheck realNameAttestationRuleCheck = RuleCheckHelper.getValue(RealNameAttestationRuleCheck.class);

	public UserIdentifyFactory(long userId, UserModel model) {
		this.userId = userId;
		this.model = model;
	}

	public UserIdentifyWay realname() throws Exception {
		String style = realNameAttestationRuleCheck.style();
		//if ("ID5".equals(style)) {// 自动认证审核
		if ("manually".equals(style)) {// 手动认证审核
			return new ManualUserIdentifyWay(userId, model);
		}
		return null;
	}

}
